package com_game.itheima;

public class Deno04 {
    public static void main(String[] args) {
        short a = 1;
//        a = a + 1;  // 错误，因为a是int类型，10是int类型，a+10是int类型，而short是short类型，不能直接赋值
        a = (short) (a + 1);  // 强转
        System.out.println("a:" + a);
        short aa = 1;
        aa += 1;  // 赋值运算符包含了强转
        System.out.println("aa:" + aa);

    }
}
